package com.example.ymm.modules1.mapper.my.user;

import com.example.ymm.base.CoreMapper;
import com.example.ymm.modules1.entity.my.user.DbCard;
import com.example.ymm.modules1.entity.my.user.DbUser;
import com.example.ymm.modules1.service.dto.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface DbCardMapper extends CoreMapper<DbCard> {

    Integer getMonthCount(DbCardQueryCriteria criteria);

    List<String> getMonthCountList(DbCardQueryCriteria criteria);

    List<String> getDayListCount(DbCardQueryCriteria criteria);

    Long getDayCount(DbCardQueryCriteria criteria);

    /**
     * 查询补卡
     * @param criteria
     * @return
     */
    Integer getTodayPatchCardCount(DbCardQueryCriteria criteria);

    List<DbUser> getMobileDayCount(DbCardQueryCriteria criteria);

    List<String> getYearCount(DbCardQueryCriteria criteria);


    List<DbUser> getRankings(DbCardQueryCriteria criteria);

    /**
     * 电脑排行榜
     * @param criteria
     * @return
     */
    List<SysRankingListDto> sysRankingList(SysRankingQueryCriteria criteria);


    /**
     * 出勤率统计
     * @param criteria
     * @return
     */
    List<RankingUserDto>  dutyTableList(RankingUserQueryCriteria criteria);


    List<RankingMonthDto>  rankingMonths(RankingUserQueryCriteria criteria);

}